home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmLicence
- Caption = "Licence Registration"
- ClientHeight = 2784
- ClientLeft = 48
- ClientTop = 276
- ClientWidth = 4800
- LinkTopic = "Form1"
- ScaleHeight = 2784
- ScaleWidth = 4800
- StartUpPosition = 3 'Windows Default
- Begin VB.TextBox editLicenceKey
- Height = 372
- Left = 480
- TabIndex = 5
- Top = 1440
- Width = 3972
- End
- Begin VB.CommandButton btnCancel
- Caption = "&Cancel"
- Height = 372
- Left = 3000
- TabIndex = 4
- Top = 2160
- Width = 972
- End
- Begin VB.CommandButton btnOK
- Caption = "&OK"
- Height = 372
- Left = 720
- TabIndex = 3
- Top = 2160
- Width = 1092
- End
- Begin VB.TextBox editReference
- BackColor = &H8000000B&
- Height = 288
- Left = 480
- Locked = -1 'True
- TabIndex = 1
- Top = 600
- Width = 3972
- End
- Begin VB.Label Label2
- Caption = "Licence Key:"
- Height = 252
- Left = 240
- TabIndex = 2
- Top = 1080
- Width = 1692
- End
- Begin VB.Label Label1
- Caption = "Reference Code:"
- Height = 252
- Left = 240
- TabIndex = 0
- Top = 240
- Width = 1332
- End
- Attribute VB_Name = "frmLicence"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private m_bIsLicenceOK As Boolean
- Private Sub Form_Load()
- Dim bRet As Boolean
- Dim strReference As String
- strReference = String$(128, 0)
- bRet = Sheriff.GetReference(strReference)
- frmLicence.editReference.Text = strReference
- m_bIsLicenceOK = False
- End Sub
- Private Sub btnCancel_Click()
- Unload Me
- End Sub
- Private Sub btnOK_Click()
- Dim bRet As Boolean
- Dim strReference As String
- Dim strLicence As String
- strReference = editReference.Text
- strLicence = editLicenceKey.Text
- Dim strTitle As String
- strTitle = "Licence Registation"
- bRet = Sheriff.SetLicence(strReference, strLicence)
- If (bRet = True) Then
- Dim strMsg As String
- strMsg = "The licence has been registered successfully!"
- MsgBox strMsg, vbOKOnly, strTitle
- Unload Me
- m_bIsLicenceOK = True
- Exit Sub
- End If
- Dim strErrorMsg As String
- strErrorMsg = String$(256, 0)
- bRet = Sheriff.GetLastErrorMessage(strErrorMsg)
- MsgBox strErrorMsg, vbExclamation, strTitle
- End Sub
- Public Function IsLicenceOK() As Boolean
- IsLicenceOK = m_bIsLicenceOK
- End Function
-